package com.pj.common.base.toolbar

import android.os.Bundle
import androidx.recyclerview.widget.RecyclerView
import com.blankj.utilcode.util.LogUtils
import com.pj.common.R
import com.pj.common.base.BaseViewModel
import com.pj.common.base.IPullRecyclerLayout
import com.pj.common.databinding.LayoutPullRecyclerviewBinding
import com.qmuiteam.qmui.recyclerView.QMUIRVDraggableScrollBar
import com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.api.RefreshLayout
import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener

abstract class BaseToolbarRecyclerActivity<VM : BaseViewModel> :
    BaseToolBarActivity<VM, LayoutPullRecyclerviewBinding>(), IPullRecyclerLayout {
    var mPullToRefresh = false
    override fun loadData(pullToRefresh: Boolean) {
        super.loadData(pullToRefresh)
        mPullToRefresh = pullToRefresh
    }
    override fun getContentLayout(): Int? {
        return R.layout.layout_pull_recyclerview
    }

    override fun initData(savedInstanceState: Bundle?) {
        super.initData(savedInstanceState)
        setup(mCBinding)

        subscribeMultiRefreshUi(mViewModel, mCBinding, this)
    }


}